<template>
	<div class="hy-container">
		<HyTable
			:searchFields="searchFields"
			:searchConfig="searchConfig"
			:searchDefault="searchDefault"
			:tableConfig="tableConfig"
			:tableColumns="tableColumns"
			ref="hyTableRef"
			:buttonConfig="{
				span: 4,
				offset: 1,
			}"
		>
			<template #operation>
				<el-table-column fixed="right" label="操作" width="75">
					<template #default="{ row }">
						<div class="flex items-center w-full justify-around">
							<el-button class="mr-5" text type="primary" icon="View" @click="handleOperate(row)">查看</el-button>
						</div>
					</template>
				</el-table-column>
			</template>
		</HyTable>
	</div>
</template>

<script lang="ts" setup>
import HyTable from '/@/components/HyTable/index.vue';
import { searchReviewMeetingApi } from '/@/api/expertDatabase/meeting';
const tableColumns = computed(() => {
	return [
		{ prop: 'meetingName', label: '会议名称' },
		{ prop: 'reviewAppStr', label: ' 评审应用' },
		{ prop: 'reviewAddress', label: '评审地点' },
		{ prop: 'contactPerson', label: '联系人' },
		{ prop: 'reviewTime', label: '评审时间' },
		{ prop: 'contactInformation', label: '联系方式' },
	];
});
const tableConfig = computed(() => {
	return {
		request: searchReviewMeetingApi,
	};
});
// 配置搜索
const searchFields = computed(() => {
	return {
		keyword: {
			type: 'input',
			label: '关键字',
		},
	};
});
const searchConfig = computed(() => {
	return {
		labelWidth: '120px',
		span: 6,
		offset: 0,
		type: 'search',
		title: '评审会议',
		show: true,
	};
});
const searchDefault = ref({});
const router = useRouter();
//操作
const handleOperate = (row?: any) => {
	router.push({
		path: '/expertDatabase/meeting/detali',
		query: {
			id: row.id,
		},
	});
};
</script>
<style scoped lang="scss"></style>
